package com.iwown.sample4GApi.bean;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.util.List;

/**
 * CollectPacket
 *
 * @program: ecg-zoo
 * @description: 采集数据封装
 * @author: Mr.Nanke
 **/
@Data
public class EcgPacket implements Serializable {

    public EcgPacket() {}
    public EcgPacket(String imei) {
        this.imei = imei;
    }

    private String imei;
    // steps:0, distance:0.000000, calorie:0.000000
    private Integer steps;
    private Float distance;
    private Float calorie;
    // battery:17, rssi:31
    private Integer battery;
    private Integer rssi;
    private String time;

    private List<GnssList> gnssList;
    private HeartInfo heartInfo;
    private BoxyInfo boxyInfo;
    private BloodInfo bloodInfo;
    private TempInfo tempInfo;
    private List<Integer> rriInfos;

    @Data
    // 定位信息 time:2025-08-25 15:48:11, lon:116.496819, lat:39.985394, loc_type:2 (1 基站定位；2 Wi-Fi定位；3 GPS定位)
    public static class GnssList {
        private String time;
        private Float lon;
        private Float lat;
        private Integer loc_type;
    }

    @Data
    @Builder
    @NoArgsConstructor
    @AllArgsConstructor
    // 心率监测数据 avg bpm-71, max bpm-75, min bpm-69
    public static class HeartInfo {
        private Integer avg;
        private Integer max;
        private Integer min;
    }
    @Data
    @Builder
    @NoArgsConstructor
    @AllArgsConstructor
    // 血氧监测数据 avg boxy-96, max boxy-96, min boxy-96
    public static class BoxyInfo {
        private Integer avg;
        private Integer max;
        private Integer min;
    }
    @Data
    @Builder
    @NoArgsConstructor
    @AllArgsConstructor
    // 血压监测数据 sbp-101, dbp-63
    public static class BloodInfo {
        private Integer sbp;
        private Integer dbp;
    }
    @Data
    @Builder
    @NoArgsConstructor
    @AllArgsConstructor
    // 体温监测数据 env-0.000000, est-36.510000, axillary-0.000000, shell-32.180000
    public static class TempInfo {
        private String env;
        private String est;
        private String axillary;
        private String shell;
    }

    // 睡眠监测数据 sleep-0, deep-0, light-0
}